﻿<%@ Page Title="" Language="vb" AutoEventWireup="false"  CodeBehind="WebForm4.aspx.vb" Inherits="PMS_Linq.WebForm4" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>

    <p>
        &nbsp;</p>
<p>
</p>
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" 
        GridLines="None" AutoGenerateDeleteColumn="True" 
        AutoGenerateEditColumn="True" AllowAutomaticDeletes="True" 
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
<MasterTableView autogeneratecolumns="False" datasourceid="SqlDataSource1" 
            datakeynames="id">
   
            <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <asp:dropdownlist id="testdd" runat="server"></asp:dropdownlist>
                    
                   </FormTemplate> 
                    </EditFormSettings>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<CommandItemSettings ShowExportToExcelButton="true" />
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="id" DefaultInsertValue="" 
            HeaderText="id" SortExpression="id" UniqueName="id" 
            DataType="System.Int32" ReadOnly="True">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="name" 
            DefaultInsertValue="" HeaderText="name" SortExpression="name" 
            UniqueName="name">
        </telerik:GridBoundColumn>
        
    </Columns>
</MasterTableView>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PMSConnectionString %>" 
        DeleteCommand="DELETE FROM test2 WHERE (id = @ID1)" 
        SelectCommand="SELECT test2.* FROM test2" 
        UpdateCommand="UPDATE test2 SET name = @name WHERE (id = @id)">
        <DeleteParameters>
            <asp:Parameter Name="ID1"  />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="name" />
            <asp:Parameter Name="id" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <p>
        ;</p>
    <p>
        &nbsp;</p>
<p>
</p>
</asp:Content>
</form>

